Optimal. Leaf size=42 \[ \frac{2 a A \cos (c+d x)}{d}-\frac{a A \sin (c+d x) \cos (c+d x)}{2 d}+\frac{3 a A x}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0687744, antiderivative size = 42, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.161, Rules used = {21, 3788, 2638, 4045, 8} \[ \frac{2 a A \cos (c+d x)}{d}-\frac{a A \sin (c+d x) \cos (c+d x)}{2 d}+\frac{3 a A x}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 21
Rule 3788
Rule 2638
Rule 4045
Rule 8
Rubi steps
\begin{align*} \int (a-a \csc (c+d x)) (A-A \csc (c+d x)) \sin ^2(c+d x) \, dx &=\frac{A \int (a-a \csc (c+d x))^2 \sin ^2(c+d x) \, dx}{a}\\ &=\frac{A \int \left (a^2+a^2 \csc ^2(c+d x)\right ) \sin ^2(c+d x) \, dx}{a}-(2 a A) \int \sin (c+d x) \, dx\\ &=\frac{2 a A \cos (c+d x)}{d}-\frac{a A \cos (c+d x) \sin (c+d x)}{2 d}+\frac{1}{2} (3 a A) \int 1 \, dx\\ &=\frac{3 a A x}{2}+\frac{2 a A \cos (c+d x)}{d}-\frac{a A \cos (c+d x) \sin (c+d x)}{2 d}\\ \end{align*}
Mathematica [A] time = 0.0553226, size = 35, normalized size = 0.83 \[ \frac{a A (6 (c+d x)-\sin (2 (c+d x))+8 \cos (c+d x))}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.041, size = 49, normalized size = 1.2 \begin{align*}{\frac{1}{d} \left ( Aa \left ( -{\frac{\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{2}}+{\frac{dx}{2}}+{\frac{c}{2}} \right ) +2\,Aa\cos \left ( dx+c \right ) +Aa \left ( dx+c \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.994249, size = 63, normalized size = 1.5 \begin{align*} \frac{{\left (2 \, d x + 2 \, c - \sin \left (2 \, d x + 2 \, c\right )\right )} A a + 4 \,{\left (d x + c\right )} A a + 8 \, A a \cos \left (d x + c\right )}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.472881, size = 97, normalized size = 2.31 \begin{align*} \frac{3 \, A a d x - A a \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 4 \, A a \cos \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 10.545, size = 105, normalized size = 2.5 \begin{align*} \begin{cases} \frac{A a x \cot ^{2}{\left (c + d x \right )}}{2 \csc ^{2}{\left (c + d x \right )}} + A a x + \frac{A a x}{2 \csc ^{2}{\left (c + d x \right )}} + \frac{2 A a \cot{\left (c + d x \right )}}{d \csc{\left (c + d x \right )}} - \frac{A a \cot{\left (c + d x \right )}}{2 d \csc ^{2}{\left (c + d x \right )}} & \text{for}\: d \neq 0 \\\frac{x \left (- A \csc{\left (c \right )} + A\right ) \left (- a \csc{\left (c \right )} + a\right )}{\csc ^{2}{\left (c \right )}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.43383, size = 107, normalized size = 2.55 \begin{align*} \frac{3 \,{\left (d x + c\right )} A a + \frac{2 \,{\left (A a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 4 \, A a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - A a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 4 \, A a\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]